From: robert.mader@collabora.com Date: Sat, 11 Feb 2023 06:06:14 +0000 (+0100) Subject: screencastService: Add dmabuf/GL pipeline X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~337^2~2^2~100 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b916ced2e62bfa36ebbb258117ed931560f688be;p=gnome-shell.git screencastService: Add dmabuf/GL pipeline This pipeline imports dmabufs and does format conversion using GL. The `video/x-raw(memory:DMABuf)` filter ensures format negotiation between `pipewiresrc` and Mutter will only succeed if Mutter advertises dmabuf support as well, falling back to the next pipeline otherwise. Using this pipeline frees Mutter from downloading buffer content on the main thread which can have a big impact on compositor performance. Doing format conversion on the GPU should further improve the overall performance on most hardware. Part-of: --- diff --git a/js/dbusServices/screencast/screencastService.js b/js/dbusServices/screencast/screencastService.js index 37327e24c..d63dd8087 100644 --- a/js/dbusServices/screencast/screencastService.js +++ b/js/dbusServices/screencast/screencastService.js @@ -29,6 +29,15 @@ const DEFAULT_FRAMERATE = 30; const DEFAULT_DRAW_CURSOR = true; const PIPELINES = [ + { + pipelineString: + 'capsfilter caps=video/x-raw(memory:DMABuf),max-framerate=%F/1 ! \ + glupload ! glcolorconvert ! gldownload ! \ + queue ! \ + vp8enc cpu-used=16 max-quantizer=17 deadline=1 keyframe-mode=disabled threads=%T static-threshold=1000 buffer-size=20000 ! \ + queue ! \ + webmmux', + }, { pipelineString: 'capsfilter caps=video/x-raw,max-framerate=%F/1 ! \